From: Konrad Rzeszutek Wilk Date: Mon, 19 Sep 2016 16:20:27 +0000 (-0400) Subject: livepatch: Drop _jmp from arch_livepatch_[apply,revert]_jmp X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~361 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=f202c23069e50404d256b5f460308c683f6220ed;p=xen.git livepatch: Drop _jmp from arch_livepatch_[apply,revert]_jmp With "livepatch: NOP if func->new_addr is zero." that name makes no more sense as we also NOP now. Reviewed-by: Ross Lagerwall Suggested-by: Jan Beulich Signed-off-by: Konrad Rzeszutek Wilk --- diff --git a/xen/arch/arm/livepatch.c b/xen/arch/arm/livepatch.c index 755f59686f..7f067a07d1 100644 --- a/xen/arch/arm/livepatch.c +++ b/xen/arch/arm/livepatch.c @@ -21,11 +21,11 @@ int arch_livepatch_verify_func(const struct livepatch_func *func) return -ENOSYS; } -void arch_livepatch_apply_jmp(struct livepatch_func *func) +void arch_livepatch_apply(struct livepatch_func *func) { } -void arch_livepatch_revert_jmp(const struct livepatch_func *func) +void arch_livepatch_revert(const struct livepatch_func *func) { } diff --git a/xen/arch/x86/livepatch.c b/xen/arch/x86/livepatch.c index d5e7174fbc..b0d81d7ceb 100644 --- a/xen/arch/x86/livepatch.c +++ b/xen/arch/x86/livepatch.c @@ -46,7 +46,7 @@ int arch_livepatch_verify_func(const struct livepatch_func *func) return 0; } -void arch_livepatch_apply_jmp(struct livepatch_func *func) +void arch_livepatch_apply(struct livepatch_func *func) { uint8_t *old_ptr; uint8_t insn[sizeof(func->opaque)]; @@ -75,7 +75,7 @@ void arch_livepatch_apply_jmp(struct livepatch_func *func) memcpy(old_ptr, insn, len); } -void arch_livepatch_revert_jmp(const struct livepatch_func *func) +void arch_livepatch_revert(const struct livepatch_func *func) { memcpy(func->old_addr, func->opaque, livepatch_insn_len(func)); } diff --git a/xen/common/livepatch.c b/xen/common/livepatch.c index 13346d7956..293f106c49 100644 --- a/xen/common/livepatch.c +++ b/xen/common/livepatch.c @@ -1031,7 +1031,7 @@ static int apply_payload(struct payload *data) } for ( i = 0; i < data->nfuncs; i++ ) - arch_livepatch_apply_jmp(&data->funcs[i]); + arch_livepatch_apply(&data->funcs[i]); arch_livepatch_revive(); @@ -1060,7 +1060,7 @@ static int revert_payload(struct payload *data) } for ( i = 0; i < data->nfuncs; i++ ) - arch_livepatch_revert_jmp(&data->funcs[i]); + arch_livepatch_revert(&data->funcs[i]); arch_livepatch_revive(); diff --git a/xen/include/xen/livepatch.h b/xen/include/xen/livepatch.h index 174af06103..b7f66d4020 100644 --- a/xen/include/xen/livepatch.h +++ b/xen/include/xen/livepatch.h @@ -86,8 +86,8 @@ unsigned int livepatch_insn_len(const struct livepatch_func *func) int arch_livepatch_quiesce(void); void arch_livepatch_revive(void); -void arch_livepatch_apply_jmp(struct livepatch_func *func); -void arch_livepatch_revert_jmp(const struct livepatch_func *func); +void arch_livepatch_apply(struct livepatch_func *func); +void arch_livepatch_revert(const struct livepatch_func *func); void arch_livepatch_post_action(void); void arch_livepatch_mask(void);